const { body,validationResult } = require('express-validator')
const { Video } = require('../../database')
const validate = require('./errorBack')

const video_validData = [
    body('title')
        .notEmpty().withMessage('视频名不能为空').bail()
        .isLength({max:200}).withMessage('视频名长度不能大于200').bail(),
    body('vodVideoID')
        .notEmpty().withMessage('vod不能为空').bail()
       
]
module.exports.create = validate(video_validData)